package com.baor.controller;

import com.baor.service.RemovalWorkOrderService;
import com.baor.util.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@Slf4j
@RestController
@RequestMapping("/removal")
public class RemovalWorkOrderController {

    @Autowired
    private RemovalWorkOrderService removalWorkOrderService;

    /**
     * 获取清运工单列表
     */
    @GetMapping("/list")
    public R getRemovalWorkOrderList(@RequestParam Map<String, Object> params) {
        log.info("查询清运工单列表，参数：{}", params);
        return removalWorkOrderService.getRemovalWorkOrderList(params);
    }

    @PostMapping("/update")
    public R updateRemovalWorkOrder(@RequestBody Map<String, Object> params) {
        log.info("编辑清运工单，参数：{}", params);
        return removalWorkOrderService.updateRemovalWorkOrder(params);
    }
}